/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #1a6bc4 0%, #0c4a8f 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    margin-bottom: 0.2rem;
    font-size: 1.5rem;
}

.nav-logo span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #a8d1ff;
}

.nav-item.active .nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #a8d1ff;
    border-radius: 3px 3px 0 0;
}

/* 主内容区域 */
.main-content {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

/* 英雄区域 */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 20px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #0c4a8f;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #555;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bridge-animation {
    width: 400px;
    height: 200px;
    position: relative;
}

.bridge {
    width: 100%;
    height: 20px;
    background: linear-gradient(to right, #8B7355, #5D4037);
    border-radius: 10px;
    position: absolute;
    bottom: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.sensor-points {
    position: absolute;
    width: 100%;
    height: 100%;
}

.sensor-points:before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #4CAF50;
    border-radius: 50%;
    top: 40px;
    left: 50px;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
    animation: pulse 2s infinite;
}

.sensor-points:after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #4CAF50;
    border-radius: 50%;
    top: 40px;
    right: 50px;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
    animation: pulse 2s infinite 0.5s;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: #1a6bc4;
    color: white;
}

.btn-primary:hover {
    background-color: #0c4a8f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: transparent;
    color: #1a6bc4;
    border: 2px solid #1a6bc4;
}

.btn-secondary:hover {
    background-color: #1a6bc4;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-outline {
    background-color: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.btn-outline:hover {
    background-color: #f5f5f5;
}

/* 项目介绍区域 */
.project-intro {
    background-color: white;
    padding: 4rem 0;
}

.project-intro h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #0c4a8f;
    font-size: 2rem;
}

.intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.intro-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid #1a6bc4;
}

.intro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.intro-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.intro-card h3 {
    margin-bottom: 1rem;
    color: #0c4a8f;
}

/* 系统特点区域 */
.features {
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #0c4a8f;
    font-size: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item h3 {
    margin-bottom: 1rem;
    color: #0c4a8f;
}

/* 系统示意图页面 */
.diagram-container {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

.system-diagram {
    flex: 2;
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.architecture-svg {
    width: 100%;
    height: auto;
}

.sensor-info {
    flex: 1;
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.sensor-info h3 {
    margin-bottom: 1rem;
    color: #0c4a8f;
}

.sensor-status-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.sensor-status-item:last-child {
    border-bottom: none;
}

.sensor-id {
    font-weight: 500;
}

.sensor-value {
    color: #4CAF50;
}

.sensor-value.warning {
    color: #FF9800;
}

.sensor-value.critical {
    color: #F44336;
}

.system-description {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-top: 2rem;
}

.system-description h2 {
    margin-bottom: 1rem;
    color: #0c4a8f;
}

.system-description ol {
    padding-left: 1.5rem;
}

.system-description li {
    margin-bottom: 0.8rem;
}

/* 性能指标页面 */
.metrics-controls {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.metric-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.metric-card.full-width {
    grid-column: 1 / -1;
}

.metric-card h3 {
    margin-bottom: 1.5rem;
    color: #0c4a8f;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.metric-item:last-child {
    border-bottom: none;
}

.metric-label {
    font-weight: 500;
}

.metric-value {
    color: #1a6bc4;
    font-weight: 600;
}

/* 控制面板页面 */
.control-panel {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.panel-section {
    margin-bottom: 3rem;
}

.panel-section h2 {
    margin-bottom: 1.5rem;
    color: #0c4a8f;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.status-overview {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-indicator.online {
    background-color: #4CAF50;
    box-shadow: 0 0 5px #4CAF50;
}

.status-indicator.warning {
    background-color: #FF9800;
    box-shadow: 0 0 5px #FF9800;
}

.status-indicator.offline {
    background-color: #F44336;
    box-shadow: 0 0 5px #F44336;
}

.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.monitor-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.monitor-card h3 {
    margin-bottom: 1rem;
    color: #0c4a8f;
}

.gauge-container {
    position: relative;
    margin: 1rem 0;
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: #0c4a8f;
}

.gauge-label {
    font-size: 0.9rem;
    color: #666;
}

.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-item.critical {
    background-color: #ffebee;
    border-left-color: #F44336;
}

.alert-item.warning {
    background-color: #fff3e0;
    border-left-color: #FF9800;
}

.alert-item.info {
    background-color: #e3f2fd;
    border-left-color: #2196F3;
}

.alert-icon {
    font-size: 1.5rem;
}

.alert-content {
    flex: 1;
}

.alert-content h4 {
    margin-bottom: 0.3rem;
}

.alert-content p {
    margin-bottom: 0.5rem;
    color: #666;
}

.alert-time {
    font-size: 0.8rem;
    color: #999;
}

.alert-action {
    background: #1a6bc4;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.alert-action:hover {
    background: #0c4a8f;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.control-group {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
}

.control-group h3 {
    margin-bottom: 1rem;
    color: #0c4a8f;
}

.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* 页脚 */
.footer {
    background-color: #0c4a8f;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* 通用样式 */
h1 {
    color: #0c4a8f;
    margin-bottom: 1rem;
}

.section-description {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-item {
        margin-left: 0;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 20px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .diagram-container {
        flex-direction: column;
    }
    
    .metrics-controls {
        flex-direction: column;
    }
    
    .status-overview {
        justify-content: center;
    }
    
    .alert-item {
        flex-direction: column;
        text-align: center;
    }
}